package com.yeping;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        //使用数组来完成

        //获取长度和子串个数，创建数组
        String s = in.nextLine();
        Character c = new Character(s.charAt(0));
        int len = Integer.parseInt(c.toString());//长度

        Character num = new Character(s.charAt(2));
        int numLen = Integer.parseInt(num.toString());//子串个数


        Character[] end = new Character[len];
        //获取每一行，然后写入数组，如不一致，则false
        for (int i = 0; i < numLen; i++){
            String temp = in.nextLine();
            //获取起点到终点
            //起点
            Character cStart = new Character(s.charAt(0));
            int start = Integer.parseInt(cStart.toString());
            //终点
            Character cRight = new Character(s.charAt(2));
            int right = Integer.parseInt(cRight.toString());
            for (int j = start - 1; j < right; j++){
                //如果为null，直接写入
                if (end[j] == null) {
                    end[j] = temp.charAt(j + 4);
                    continue;
                }
                //如果不一致，No Answer
                if (!end[j].equals(temp.charAt(j + 4))){
                    System.out.println("No Answer");
                    return;
                }
            }
        }

        //完全结束之后，判断是否满了。满了true
        boolean flag = true;
        for (Character c1 : end){
            if (c1 == null) {
                flag = false;
                break;
            }
        }
        String res = flag ? end.toString() : "Not Found";
        System.out.println(res);


        // 注意 while 处理多个 case
//        while (in.hasNextLine()) {
//            System.out.println(in.nextLine());
//        }

//        String s = in.nextLine();
//        System.out.println(s);
//        for (int i = 0; i < s.length(); i++){
//
//        }

//        Character[] chars = new Character[5];
//        System.out.println(chars[0] == null);
    }
}
